package com.du.quant.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.du.quant.entity.TradingAdvice;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface TradingAdviceMapper extends BaseMapper<TradingAdvice> {

    @Select("SELECT * FROM trading_advice WHERE stock_code = #{stockCode} ORDER BY create_time DESC LIMIT 1")
    TradingAdvice selectLatestByStockCode(String stockCode);
}